package com.goingup.domain;

import com.goingup.domain.Vector.Direction;

/**
 * A request to be picked up on a floor and go in a given direction.
 * @author pcresswell
 *
 */
public class PickUpRequest extends Request {

	private Direction direction;

	public PickUpRequest(Floor floorRequested, Direction direction) {
		super(floorRequested);
		this.direction = direction;
	}

	protected Direction getDirection(){
		return this.direction;
	}
	@Override
	public String toString() {
		return "Pick up request on floor " + this.getFloor().getNumber() + " going " + this.getDirection();
	}

	@Override
	protected void executeRequest(Elevator elevator) {
		elevator.handlePickupRequest(this);
	}
	
	

	

}
